# from uuid import UUID
#
# from fastapi_users import FastAPIUsers
# from fastapi_users.authentication import BearerTransport, JWTStrategy, AuthenticationBackend
# from core.config import settings
# from db.models.users import User
# from services.user_manager import get_user_manager
#
# # 认证后端配置
# bearer_transport = BearerTransport(tokenUrl="auth/jwt/login")
#
# def get_jwt_strategy() -> JWTStrategy:
#     return JWTStrategy(secret=settings.SECRET_KEY, lifetime_seconds=3600)
#
# auth_backend = AuthenticationBackend(
#     name="jwt",
#     transport=bearer_transport,
#     get_strategy=get_jwt_strategy,
# )
#
# # FastAPI Users实例
# fastapi_users = FastAPIUsers[User, UUID](
#     get_user_manager,
#     [auth_backend],
# )
#
# current_active_user = fastapi_users.current_user(active=True)
# current_superuser = fastapi_users.current_user(active=True, superuser=True)